<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        *{
            margin: 0;padding: 0;
        }
        html,body{
            height: 100%;
        }
        /* 图片盒子 */
        .imgbox{
            height: 100%;
        }
        /* 图片 */
        img{
            /* 脱离文档流 */
            position: fixed;top:0;left: 0;
            width: 100%;height: 100%;/* 宽高自适应 */
        }
        /* 按钮盒子 */
        .btnbox{
            width: 500px;
            height: 100px;
            /* background: red; */
            position: fixed;
            z-index: 7777;
            top: 0;
            left: 0;
            bottom: 0;right: 0;
            margin: auto auto 10px; /* 上 左右 下 */
        }
        .btnbox a{
            width: 80px;
            height: 80px;
            float: left;
            border:10px solid #fff;
            border-radius: 50%;
        }
        .btnbox a:nth-child(1){
            background: url(images/1-1.jpg);
            background-size: 100% 100%
        }
        .btnbox a:nth-child(2){
            background: url(images/2-1.jpg);
            background-size: 100% 100%
        }
        .btnbox a:nth-child(3){
            background: url(images/3-1.jpg);
            background-size: 100% 100%
        }
        .btnbox a:nth-child(4){
            background: url(images/4-1.jpg);
            background-size: 100% 100%
        }
        .btnbox a:nth-child(5){
            background: url(images/5-1.jpg);
            background-size: 100% 100%
        }
        /* 添加点击效果 hover :target */
        img:nth-child(1){
            transform: translateX(-100%);
            z-index: 4396;
            transition: 2s
        }
        img:nth-child(1):target{
            transform: translateX(0)
        }
        img:nth-child(2){
            transform: translateY(-100%);
            z-index: 4396;
            transition: 2s
        }
        img:nth-child(2):target{
            transform: translateY(0)
        }
    </style>
</head>
<body>
    <div class="imgbox">
        <img src="images/1.jpg" id="img1" alt="">
        <img src="images/2.jpg" id="img2" alt="">
        <img src="images/3.jpg" id="img3" alt="">
        <img src="images/4.jpg" id="img4" alt="">
        <img src="images/5.jpg" id="img5" alt="">
    </div>
    <div class="btnbox">
        <a href="#img1"></a>
        <a href="#img2"></a>
        <a href="#img3"></a>
        <a href="#img4"></a>
        <a href="#img5"></a>
    </div>
</body>
</html>